# Copyright 2020 Makani Technologies LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Automatically-retrieved McLaren controller params.

This file was originally generated by: write_mclaren_matlab_params.m.

It has now been updated manually because the import script doesn't work
anymore. :(

TODO(b/118814184): Make a robust import mechanism.
"""

from makani.config import mconfig


@mconfig.Config
def MakeParams():
  """Returns automatically Matlab generated McLaren controller params."""
  return {'mclaren': {
      'aDead_Azi_Transform': 0.500,
      'aDead_Winch_Transform': 0.0500,
      'aTargetHT2Reel_Azi_Transform': [0.00, 0.00, 89.0, 89.0, 90.0],
      'aTargetHT2Reel_Winch_Transform': [0.00, -165., -165., -203., -360.],
      'aTargetReel2HT_Azi_Transform': [90.0, 0.00, 0.00, 89.0, 90.0],
      'aTargetReel2HT_Winch_Transform': [-360., 0.00, -165., -165., -203.],
      'aTolHT2Reel_Azi_Transform': [100., 10.0, 2.00, 5.00, 5.00],
      'aTolHT2Reel_Winch_Transform': [30.0, 2.00, 2.00, 2.00, 2.00],
      'aTolReel2HT_Azi_Transform': [5.00, 10.0, 10.0, 8.00, 8.00],
      'aTolReel2HT_Winch_Transform': [30.0, 0.10, 2.00, 2.00, 2.00],
      'dnMax_Azi_Transform': 0.110,
      'dnMax_Winch_Transform': 0.025,
      'nNominal_Azi_Transform': 0.500,
      'nNominal_Winch_Transform': 0.250,
      'rDecel_Azi_Transform': 0.800,
      'rDecel_Winch_Transform': 0.500}
         }
